package com.main.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.mobile.device.DeviceUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.main.utils.CommonUtils;

@Controller
public class HomeController {

	@RequestMapping(value = "/contact", method = RequestMethod.GET)
	public String contact(Model model, HttpServletRequest request) {
		String path = CommonUtils.getRootPathByDevice(DeviceUtils.getCurrentDevice(request));
		return path + "contact";
	}
	
	@RequestMapping(value = "/about", method = RequestMethod.GET)
	public String about(Model model, HttpServletRequest request) {
		String path = CommonUtils.getRootPathByDevice(DeviceUtils.getCurrentDevice(request));
		return path + "about";
	}
	
	@RequestMapping(value = "/faq", method = RequestMethod.GET)
	public String faq(Model model, HttpServletRequest request) {
		String path = CommonUtils.getRootPathByDevice(DeviceUtils.getCurrentDevice(request));
		return path + "faq";
	}
	
	@RequestMapping(value = "/tos", method = RequestMethod.GET)
	public String tos(Model model, HttpServletRequest request) {
		String path = CommonUtils.getRootPathByDevice(DeviceUtils.getCurrentDevice(request));
		return path + "tos";
	}
}
